package com.njtoyo.netrides.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author Dell
 * @Date 2018/10/11 16:57
 */
@Entity
@Table(name = "cancellation_transaction_log")
@Accessors(chain = true)
@Data
public class CancellationTransactionLog implements Serializable {

    /**
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 行程订单id
     */
    private Long cancellationOrderId;

    /**
     * 金额
     */
    private BigDecimal amount;

    /**
     * 实际支付金额
     */
    private BigDecimal payAmount;

    /**
     * 支付方式
     */
    @Enumerated
    private Znum.PayThrough payThrough;

    /**
     * 优惠券抵扣金额
     */
    private BigDecimal couponPaid;

    /**
     * 优惠券ID
     */
    private Long couponId;

    /**
     * 优惠券使用类型
     */
    @Enumerated
    private Znum.CouponCtg couponCategory;

    /**
     * 余额支付金额
     */
    private BigDecimal balancePaid;

    /**
     * 余额流水表ID
     */
    private Long rechargeId;

    /**
     * 创建时间
     */
    @JsonIgnore
    private Date createdAt;

    /**
     * 修改时间
     */
    @JsonIgnore
    private Date updatedAt;

}
